set(MODULE_PATH CHIP8)
set(MODULE_NAME CHIP8)
set(${MODULE_NAME}_SRC_PATH ${PROJECT_SOURCE_DIR}/modules/${MODULE_PATH})

include_directories(${${MODULE_NAME}_SRC_PATH}/include)

file(GLOB ${MODULE_NAME}_HEADERS
        ${${MODULE_NAME}_SRC_PATH}/include/*.h
        ${${MODULE_NAME}_SRC_PATH}/include/*.hpp
        )
file(GLOB ${MODULE_NAME}_SOURCES
        ${${MODULE_NAME}_SRC_PATH}/sources/*.c
        ${${MODULE_NAME}_SRC_PATH}/sources/*.cpp
        )

set(${MODULE_NAME}__SRC
        ${${MODULE_NAME}_HEADERS}
        ${${MODULE_NAME}_SOURCES}
        )
foreach (FILE ${${MODULE_NAME}__SRC})
    message(STATUS "FIND ${FILE}")
endforeach ()

add_library(${MODULE_NAME} SHARED ${${MODULE_NAME}__SRC})
qt5_use_modules(${MODULE_NAME} Core Widgets Gui OpenGL Network)
